package com.ruoyi.find.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.find.mapper.MembershipCategoryMapper;
import com.ruoyi.find.domain.MembershipCategory;
import com.ruoyi.find.service.IMembershipCategoryService;

/**
 * 用户分类Service业务层处理
 * 
 * @author gjq
 * @date 2025-09-17
 */
@Service
public class MembershipCategoryServiceImpl implements IMembershipCategoryService 
{
    @Autowired
    private MembershipCategoryMapper membershipCategoryMapper;

    /**
     * 查询用户分类
     * 
     * @param id 用户分类主键
     * @return 用户分类
     */
    @Override
    public MembershipCategory selectMembershipCategoryById(Long id)
    {
        return membershipCategoryMapper.selectMembershipCategoryById(id);
    }

    /**
     * 查询用户分类列表
     * 
     * @param membershipCategory 用户分类
     * @return 用户分类
     */
    @Override
    public List<MembershipCategory> selectMembershipCategoryList(MembershipCategory membershipCategory)
    {
        return membershipCategoryMapper.selectMembershipCategoryList(membershipCategory);
    }

    /**
     * 新增用户分类
     * 
     * @param membershipCategory 用户分类
     * @return 结果
     */
    @Override
    public int insertMembershipCategory(MembershipCategory membershipCategory)
    {
        return membershipCategoryMapper.insertMembershipCategory(membershipCategory);
    }

    /**
     * 修改用户分类
     * 
     * @param membershipCategory 用户分类
     * @return 结果
     */
    @Override
    public int updateMembershipCategory(MembershipCategory membershipCategory)
    {
        return membershipCategoryMapper.updateMembershipCategory(membershipCategory);
    }

    /**
     * 批量删除用户分类
     * 
     * @param ids 需要删除的用户分类主键
     * @return 结果
     */
    @Override
    public int deleteMembershipCategoryByIds(Long[] ids)
    {
        return membershipCategoryMapper.deleteMembershipCategoryByIds(ids);
    }

    /**
     * 删除用户分类信息
     * 
     * @param id 用户分类主键
     * @return 结果
     */
    @Override
    public int deleteMembershipCategoryById(Long id)
    {
        return membershipCategoryMapper.deleteMembershipCategoryById(id);
    }
}
